<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>转化为布尔型</title>
</head>
<body>
    <script>
        console.log(Boolean(123));
        console.log(Boolean("qqq"));
        console.log(Boolean(""));
        console.log(Boolean(0));
        console.log(Boolean(null));

        //有字符串就是ture
        //没有字符串就是false
    </script>
</body>
</html>